﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Security;
using WCLOnlineExam.Models;

namespace WCLOnlineExam.Controllers
{
    [Authorize]
    public class StudentController : EntityController
    {
        public StudentController(IEntityContextBuilder builder) : base(builder) { }
        //
        // GET: /Student/
       
        public ActionResult UserCenter()
        {
            if (Session["user"] == null)
            {
                return RedirectToRoute(new { controller = "Account", action = "Login" });
            }
            else 
            {
                ViewBag.user = Session["user"];
                return View();
            }

        }

        public ActionResult Setting()
        {
            if (Session["user"] == null)
            {
                return RedirectToRoute(new { controller = "Account", action = "Login" });
            }
            else 
            {
                ViewBag.user = Session["user"];
                return View();
            }
        }

        public ActionResult ChangePassword()
        {
            if (Session["user"] == null)
            {
                return RedirectToRoute(new { controller = "Account", action = "Login" });
            }
            else 
            {
                ViewBag.user = Session["user"];
                return View();
            }
        }

        public ActionResult Analysis()
        {
            if (Session["user"] == null)
            {
                return RedirectToRoute(new { controller = "Account", action = "Login" });
            }
            else 
            {
                ViewBag.user = Session["user"];
                return View();
            }
        }

        public ActionResult ExamHistory()
        {
            if (Session["user"] == null)
            {
                return RedirectToRoute(new { controller = "Account", action = "Login" });
            }
            else 
            {
                ViewBag.user = Session["user"];
                return View();
            }
        }
        
	}
}